const mongoose = require('mongoose');
const schemas  = require('./schema');

Object.keys(schemas).map(key => {
	mongoose.model(key.charAt(0).toUpperCase() + key.slice(1), new mongoose.Schema(schemas[key], {timestamps: true}))
})

module.exports = {
	get: (name) => {
		return mongoose.model(name);
	}
}